Delete an Uploaded File
In Bizagi, you may delete the content of File-type attributes without an end user's intervention using an expression.
For example, in a Loans Request Process, the Process Entity is called Request. Assume in this entity there is a File-type attribute called HistoryFile that will store documents that are attached in several activities of the Process.
To delete the uploaded files, use this statement:
Me.deleteAllCollectionItems("Request.HistoryFile");
DO NOT USE this statement as THE VALUE OF THE UPLOADED FILE WILL REMAIN UNCHANGED:
Me.setXPath("Request.HistoryFile", null)
Note this expression is similar to the ones used to delete records from a collection. This is because file-type attributes are treated as a collection of files, and for this reason, you can store many files in a single attribute.